package service;

import java.math.BigDecimal;

public class Context {

    private Strategy strategy;
    private BigDecimal begin;

    public Context(Strategy strategy, BigDecimal begin) {
        this.strategy = strategy;
        this.begin = begin;
    }

    public BigDecimal calcforSum(){
        return strategy.calcForSum(begin);
    }

    public Strategy getStrategy() {
        return strategy;
    }

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }
}
